#pragma once
#include "lua.hpp"
#include "Singleton.h"
#include <unordered_map>
class LuaManager:public Singleton<LuaManager>
{
public:
	LuaManager();
	~LuaManager();

	void InitLua();

	bool CallLua(const char* fnName, ...);


	void GetStaticVar(lua_State* L);
private:
	void InitLuaAPI();
private:
	lua_State* m_LuaState = nullptr;

public:
	std::unordered_map<std::string, int> m_VarTable;
};
